package com.graduate.game.topic.mapper;

import com.graduate.game.assignment.pojo.assignment;
import com.graduate.game.topic.pojo.comment;
import com.graduate.game.topic.pojo.topic;
import com.graduate.game.topic.service.TopicService;
import com.graduate.game.user.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface topicMapper {
    //获取全部论坛数据
    List<topic> getAllTopic();
    //随机获得一条论坛数据
    topic getOneTopic();
    //根据ID获取内容
    topic getIdContent(int themeid);
    //发布话题
    public int insertTopic(topic topic);
    //根据用户publisher获取用户的一整条信息
    public List<topic> getOneUsername(String publisher);
    //模糊查询
    public List<topic> serchtopic(String title);
    //增加游览次数
    public int addAnnenadedAn(topic topic);
    //查看游览次数
    public int checkannext(int themeid);
    //分页查询
    public List<topic> getAllTopicBypage(Map<String,Object> data);

    //发布评论
    public int insertComment(comment comment);
    //查看评论
    public List<comment> getAllComment(int themeid);

    //删除某个话题
    public int delById(long id);

}
